package main.model.hexisland;

import main.model.hexisland.eventprocessor.HexIslandEventProcessor;
import main.model.hexisland.location.HexLocation;
import main.model.hexisland.tile.Tile;
import main.model.hexisland.tile.TileType;

import java.io.File;

/**
 * Created with IntelliJ IDEA.
 * User: gabe
 * Date: 11/06/13
 * Time: 22:09
 * To change this template use File | Settings | File Templates.
 */
public interface HexIsland extends HexIslandEventProcessor {

    /**
     * Returns the tile at the provided location.
     * Or null if the location is unavailable.
     * @param hexLocation
     * @return
     */
    public Tile getTile(HexLocation hexLocation);
    /**
     * Returns the tile at the provided location.
     * Or null if the location is unavailable.
     * @param q
     * @param r
     * @return
     */
    public Tile getTile(int q, int r);

    public void setTile(HexLocation hexLocation, Tile t);
    public void setTile(int q, int r, Tile t);

    public TileType getTileType(HexLocation hexLocation);
    public TileType getTileType(int q, int r);

    public boolean hasCentralObstacle(HexLocation hexLocation);
    public boolean hasCentralObstacle(int q, int r);

    public boolean isAccessible(HexLocation hexLocation);
    public boolean isAccessible(int q, int r);

    public void setSize(int q, int r);
    public int getQSize();
    public int getRSize();

    public int getMinSize();
    public int getMaxSize();
    public int getDefaultSize();

    public File loadedIsland();

    public void randomize();
    public void overWriteIsland(HexIsland newHexIsland);
    public void clear();
    public void clear(int q , int r);
}
